package com.pi.cs.enumerate;

public enum FeedStatus {

  UNRESOLVED(0, "未处理"),
  RESOLVED(1, "已处理"),
  ;
  private int status;
  private String desc;
  private FeedStatus(int status, String desc) {
    this.status = status;
    this.desc = desc;
  }
  public int getStatus() {
    return status;
  }
  public String getDesc() {
    return desc;
  }
  
  public static String getFeedStatus(Integer status){
    if(null == status || status < 0){
      return UNRESOLVED.desc;
    }
    for(FeedStatus feedStatus: FeedStatus.values()){
      if(feedStatus.getStatus() == status){
        return feedStatus.getDesc();
      }
    }
    return UNRESOLVED.desc;
  }
}
